package club.monkeywood.service.buyer;

import club.monkeywood.dataobject.Production;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.List;

public interface ProductionInfoService {

    Production findById(Integer id);
    List<Production> findByName(String name);
    Production findByid(Integer id);
    List<Production> findByIdIn(List<Integer> ids);
    Production findByCategoryId(Integer id);
    List<Production> findByCategoryIdIn(List<Integer> ids);
    List<Production> queryCategoryProductions();
    Page<Production> findAll(Pageable pageable);
    List<Production> findUPAll();
    Page<Production> findUPAll(Pageable pageable);

    //扣库存
    //id:商品id
    //count:扣除量
    Production decreaseStock(Integer id, Integer count);

}
